<?php

class User_Form_Login extends Zend_Dojo_Form
{
    public function init()
    {    	
        $this->setName("login");
        $this->setMethod('post');
        $this->setAction('user/auth/index');
        $this->setOptions(array('onSubmit'=>"return(validateForm(this))"));
        
        $this->addElement('ValidationTextBox', 'username',array(        
	        'label'          => 'Usuário',
	        'required'       => true,
	        'regExp'         => '[\w]+',
	        'invalidMessage' => 'Usuário inválido',
        	'style'      	 => 'width: 100%; height: 35px;',
        ));
        
        $this->addElement('PasswordTextBox', 'password',array(        
	        'label'          => 'Senha',
	        'required'       => true,
        	'trim'           => true,
	        'invalidMessage' => 'Senha invália',
        	'style'      	 => 'width: 100%; height: 35px;',
        ));

        $this->addElement('SubmitButton', 'button', array(
            'label'    => 'Entrar',
	        'required' => false,
	        'ignore' => true,
        ));    

    }
}

